package com.google.jessewilson.codesearch.api;

/**
 * Search results are grouped in pages. For example, to request the first
 * 100 results, that's a page starting at 0 and ending at 100. To request the next
 * 100 results, that's a page starting at 100 and ending at 200.  
 *
 * @author jessewilson
 */
public class Page {
  private final int start;
  private final int end;

  public Page(int start, int end) {
    this.start = start;
    this.end = end;
  }

  /**
   * Returns the first result included on this page.
   */
  public int getStart() {
    return start;
  }

  /**
   * Returns the first result that's larger than start but not included
   * on this page.
   */
  public int getEnd() {
    return end;
  }
}
